import request from '@/utils/request'

/**
 * 获取文章列表
 * @param {*} categoryId 1：公司要闻 2：基层动态 3：媒体聚焦 4：党建动态 5：工会团建 6：国资动态
 * @param {*} page 
 * @returns 
 */
export function getArticleList(categoryId, page, pageSize = 10) {
  return request({
    url: `/article/${categoryId}/${page}`,
    method: 'get',
    params: {
      pageSize
    }
  })
}

/**
 * 文章搜索
 * @param {*} pageNo 
 * @param {*} pageSize 
 * @param {*} titleLike 
 * @param {*} category 
 * @param {*} QueryCreatetime 
 * @returns 
 */
export function articleQuery (pageNo, pageSize, titleLike, category, QueryCreatetime) {
  return request({
    url: '/article/search',
    method: 'get',
    params: {
      pageNo,
      pageSize,
      titleLike,
      category,
      QueryCreatetime
    }
  })
}
